import {
	requestD,
	requestG,
	requestK,
	requestP
} from './request.js'

const loginApi = data => requestK('admin/login/courierLogin', data, false) // 快递员登录授权
const getUpdateVersionApi = data => requestG('inform/getUpdateVersion', data, false) // 获取版本信息
const getUserApi = data => requestG('admin/login/getUserInfo', data) // 获取自己的用户信息
const logoutApi = data => requestD('admin/login/logout', data) // 退出登录
const editPassApi = data => requestP('admin/user/editPass', data) // 更改密码
const editAvatarApi = data => requestK('admin/user/editAvatar', data) // 编辑头像
const listAllUserApi = data => requestG('admin/user/listAllUser', data) // 获得所有的网点
const listByNameApi = data => requestG("expressOrder/listByName", data); // 通过名字获得单号列表
const listBrandApi = data => requestG("expressOrder/listBrand", data); // 模糊搜索品牌列表
const translateApi = data => requestG("inform/translate", data); // 翻译
const updateCourierExpressOrderApi = data => requestP("expressOrder/updateCourierExpressOrder", data); // 添加有子单快递单
const getCourierUsableApi = data => requestG("expressOrder/getCourierUsable", data); // 快递员获得最小可用单号
const pageCourierMailApi = data => requestG("mail/pageCourierMail", data); // 快递员获得在线下单
const getSenderApi = data => requestG("inform/getSender", data); // 获取发件人
const getFundApi = data => requestG("fund/getFund", data); // 获得网点资金
const addCourierOperationApi = data => requestK("operation/addCourierOperation", data); // 添加快递员运营
const checkApi = data => requestG("operation/check", data); // 检测单号
const pageCourierExpressOrderApi = data => requestG("expressOrder/pageCourierExpressOrder", data); // 快递员获得订单列表
const getOperationApi = data => requestG("commentUser/getOperation", data); // 通过单号精确获得运营信息
const getExpressOrderApi = data => requestG("expressOrder/getExpressOrder", data); // 通过id获得单号详情
const addCourierEditExpressOrderApi = data => requestK("expressOrder/addCourierEditExpressOrder", data); // 快递员添加编辑订单信息
const pageCourierEditExpressOrderApi = data => requestG("expressOrder/pageCourierCurrentEditExpressOrder", data); // 快递员分页获得编辑订单信息列表
const getParentApi = data => requestG("admin/user/getParent", data); // 获得父网点的信息

export default {
	loginApi,
	getUpdateVersionApi,
	getUserApi,
	logoutApi,
	editPassApi,
	editAvatarApi,
	listAllUserApi,
	listByNameApi,
	listBrandApi,
	translateApi,
	updateCourierExpressOrderApi,
	getCourierUsableApi,
	pageCourierMailApi,
	getSenderApi,
	getFundApi,
	addCourierOperationApi,
	checkApi,
	pageCourierExpressOrderApi,
	getOperationApi,
	getExpressOrderApi,
	addCourierEditExpressOrderApi,
	pageCourierEditExpressOrderApi,
	getParentApi
}
